package com.us.util;

import java.io.File;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;

/**
 * XML的操作类
 * 
 * @author monlyu
 */
public class XMLUtil {

    /**
     * 把Xml文件转化为Document对象
     * 
     * @since 2009-12-27
     */
    public static Document xml2Document(File file) throws DocumentException {
        Document document = null;
        SAXReader reader = new SAXReader();
        document = reader.read(file);
        return document;
    }

}
